# -*- coding: utf-8 -*-
"""
:mod:`nubox.short`
==================

Provides the ``NuBox`` hierarchy of sub-classes to store integer numbers as 
``longs``. 

"""
from __future__ import (division, with_statement, absolute_import, generators,
                         nested_scopes)

from .core import NuBoxScalar, NuBoxVector, NuBoxArray, NuBoxCube
from .const import INT_DUMMY


class Short(NuBoxScalar):
    """
    A scalar ``NuBox`` to hold an integer number as ``short``.
    
    """
    clstypecode = 'h'
    clsdummy = INT_DUMMY


class ShortVector(Short, NuBoxVector):
    """
    A vector of ``Shorts``.
    
    """
    clschild = Short


class ShortArray(ShortVector, NuBoxArray):
    """
    An array of ``Shorts`` (vector of ``ShortVectors``).
    
    """
    clschild = ShortVector


class ShortCube(ShortArray, NuBoxCube):
    """
    A cube of ``Shorts`` (vector of ``ShortArrays``).
    
    """
    clschild = ShortArray


Short.clsparent = ShortVector
ShortVector.clsparent = ShortArray
ShortArray.clsparent = ShortCube

del NuBoxScalar, NuBoxVector, NuBoxArray, NuBoxCube
